namespace LetLord.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using System.Collections.Generic;

    using LetLord.Models;
    using System.Data;

    internal sealed class Configuration : DbMigrationsConfiguration<LetLord.Models.LetLordContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
        }

        //protected override void Seed(LetLord.Models.LetLordContext context)
        //{
        //    try
        //    {
        //        #region Tenants

        //        var tenants = new List<Tenant>
        //    {
        //        new Tenant { UserName="Matthew",  FirstName="Matthew",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Dublin", HasChildren=false, HasRentAllowance=true, IsInGroup=false, IsProfessional=true, IsStudent=false, MaxBudget=00, MinBudget=600, PersonalDescription="a", TenantAge="18", DesiredNumberOfBedrooms=NumberOfBedrooms.Two },
        //        new Tenant { UserName="Pat",      FirstName="Pat",       LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Tallaght", HasChildren=true, HasRentAllowance=false, IsInGroup=true, IsProfessional=false, IsStudent=true, MaxBudget=00, MinBudget=500, PersonalDescription="a", TenantAge="30", DesiredNumberOfBedrooms=NumberOfBedrooms.Three },
        //        new Tenant { UserName="Rachel",   FirstName="Rachel",    LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Templeogue", HasChildren=false, HasRentAllowance=true, IsInGroup=false, IsProfessional=true, IsStudent=false, MaxBudget=00, MinBudget=400, PersonalDescription="a", TenantAge="40", DesiredNumberOfBedrooms=NumberOfBedrooms.Two },
        //        new Tenant { UserName="Marie",    FirstName="Marie",     LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Rathfarnham", HasChildren=true, HasRentAllowance=false, IsInGroup=true, IsProfessional=false, IsStudent=true, MaxBudget=00, MinBudget=500, PersonalDescription="a", TenantAge="25", DesiredNumberOfBedrooms=NumberOfBedrooms.Three },
        //        new Tenant { UserName="Patrick",  FirstName="Patrick",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Rathfarnham", HasChildren=false, HasRentAllowance=true, IsInGroup=false, IsProfessional=true, IsStudent=false, MaxBudget=00, MinBudget=500, PersonalDescription="a", TenantAge="28", DesiredNumberOfBedrooms=NumberOfBedrooms.Two },
        //        new Tenant { UserName="David",    FirstName="David",     LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Rathfarnham", HasChildren=true, HasRentAllowance=false, IsInGroup=true, IsProfessional=false, IsStudent=true, MaxBudget=00, MinBudget=800, PersonalDescription="a", TenantAge="32", DesiredNumberOfBedrooms=NumberOfBedrooms.Four },
        //        new Tenant { UserName="Peter",    FirstName="Peter",     LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Templeogue", HasChildren=false, HasRentAllowance=true, IsInGroup=false, IsProfessional=true, IsStudent=false, MaxBudget=00, MinBudget=1000, PersonalDescription="a", TenantAge="35", DesiredNumberOfBedrooms=NumberOfBedrooms.Two },
        //        new Tenant { UserName="Mike",     FirstName="Mike",      LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Templeogue", HasChildren=true, HasRentAllowance=false, IsInGroup=true, IsProfessional=false, IsStudent=true, MaxBudget=00, MinBudget=1200, PersonalDescription="a", TenantAge="45", DesiredNumberOfBedrooms=NumberOfBedrooms.Three },
        //        new Tenant { UserName="Sandra",   FirstName="Sandra",    LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Cork", HasChildren=false, HasRentAllowance=true, IsInGroup=false, IsProfessional=true, IsStudent=false, MaxBudget=00, MinBudget=900, PersonalDescription="a", TenantAge="55", DesiredNumberOfBedrooms=NumberOfBedrooms.Three },
        //        new Tenant { UserName="Mary",    FirstName="Mary",       LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Tenant, DateWantToRentFrom=DateTime.Now, DateWantToRentTo=DateTime.Now, DesiredPropertyLocation="Galway", HasChildren=true, HasRentAllowance=false, IsInGroup=true, IsProfessional=false, IsStudent=true, MaxBudget=00, MinBudget=800, PersonalDescription="a", TenantAge="48", DesiredNumberOfBedrooms=NumberOfBedrooms.Five }
        //    };
        //        tenants.ForEach(t => context.UserProfile.AddOrUpdate(t));
        //        context.SaveChanges();

        //        #endregion

        //        #region Landlords

        //        var landlords = new List<Landlord>
        //    {
        //        new Landlord { UserName="Frank",     FirstName="Frank",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="James",     FirstName="James",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Maude",     FirstName="Maude",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Stephen",   FirstName="Stephen", LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Helen",     FirstName="Helen",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Heather",   FirstName="Heather", LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Alan",      FirstName="Alan",    LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Richard",   FirstName="Richard", LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Frank",     FirstName="Frank",   LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //        new Landlord { UserName="Rita",      FirstName="Rita",    LastName="O'Sullivan", Email="a@a.com", AccountType=AccountType.Landlord, ResidentialProperties = new List<ResidentialProperty>() },
        //    };
        //        landlords.ForEach(l => context.UserProfile.AddOrUpdate(l));
        //        context.SaveChanges();


        //        #endregion

        //        #region ResidentialProperties

        //        var residentialProperties = new List<ResidentialProperty>
        //    {
        //        // Property 1 associated with LandLord 1
        //        new ResidentialProperty { PropertyType=PropertyType.Detached, Description="Some description...", NumberOfBedrooms="4", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=false, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 11 },

        //        // Property 2 associated with LandLord 2
        //        new ResidentialProperty { PropertyType=PropertyType.Detached, Description="Some description...", NumberOfBedrooms="3", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=true, IsDisabledFriendly=true, DateAdded=DateTime.Now, UserId = 12 },

        //        // Property 3 associated with LandLord 3
        //        new ResidentialProperty { PropertyType=PropertyType.SemiDetached, Description="Some description...", NumberOfBedrooms="3", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 13 },

        //        // Property 4 associated with LandLord 4
        //        new ResidentialProperty { PropertyType=PropertyType.SemiDetached, Description="Some description...", NumberOfBedrooms="2", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=false, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 14 },

        //        // Property 5 associated with LandLord 5
        //        new ResidentialProperty { PropertyType=PropertyType.Terrace, Description="Some description...", NumberOfBedrooms="2", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=false, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 15 },

        //        // Property 6 associated with LandLord 6
        //        new ResidentialProperty { PropertyType=PropertyType.TownHouse, Description="Some description...", NumberOfBedrooms="3", NumberOfReceptionRooms="2", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=false, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 16 },

        //        // Property 7 associated with LandLord 7
        //        new ResidentialProperty { PropertyType=PropertyType.Apartment, Description="Some description...", NumberOfBedrooms="2", NumberOfReceptionRooms="1", NumberOfBathrooms="3", HasBackGarden=false, HasFrontGarden=false, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 17 },

        //        // Property 8 associated with LandLord 8
        //        new ResidentialProperty { PropertyType=PropertyType.Bungalow, Description="Some description...", NumberOfBedrooms="5", NumberOfReceptionRooms="3", NumberOfBathrooms="4", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 18 },

        //        // Property 9 associated with LandLord 9
        //        new ResidentialProperty { PropertyType=PropertyType.Cottage, Description="Some description...", NumberOfBedrooms="3", NumberOfReceptionRooms="1", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=false, HasSecureParking=true, IsDisabledFriendly=false, DateAdded=DateTime.Now, UserId = 19 },

        //        // Property 10 associated with LandLord 10
        //        new ResidentialProperty { PropertyType=PropertyType.Mews, Description="Some description...", NumberOfBedrooms="2", NumberOfReceptionRooms="1", NumberOfBathrooms="2", HasBackGarden=true, HasFrontGarden=true, HasSecureParking=false, IsDisabledFriendly=false, DateAdded=DateTime.Now,  UserId = 20 }
        //    };
        //        residentialProperties.ForEach(rp => context.ResidentialProperty.AddOrUpdate(rp));
        //        context.SaveChanges(); // This line is where the exception is being thrown

        //        #endregion

        //        landlords[0].ResidentialProperties.Add(residentialProperties[0]);
        //        landlords[1].ResidentialProperties.Add(residentialProperties[1]);
        //        landlords[2].ResidentialProperties.Add(residentialProperties[2]);
        //        landlords[3].ResidentialProperties.Add(residentialProperties[3]);
        //        landlords[4].ResidentialProperties.Add(residentialProperties[4]);
        //        landlords[5].ResidentialProperties.Add(residentialProperties[5]);
        //        landlords[6].ResidentialProperties.Add(residentialProperties[6]);
        //        landlords[7].ResidentialProperties.Add(residentialProperties[7]);
        //        landlords[8].ResidentialProperties.Add(residentialProperties[8]);
        //        landlords[9].ResidentialProperties.Add(residentialProperties[9]);
        //        context.SaveChanges();

        //        #region TenantPreferences

        //        var tenantPreferences = new List<TenantPreferences>
        //    {
        //       // Tenant 1
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=false, Weighting=(int)Weighting.Six, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.Ten, Tenant = tenants.FirstOrDefault(u => u.UserId == 1) },

        //       // Tenant 2
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 2) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 2) },

        //       // Tenant 3
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 3) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 3) },

        //       // Tenant 4
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 4) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 4) },

        //       // Tenant 5
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 5) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 5) },

        //       // Tenant 6
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 6 )},
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 6) },

        //       // Tenant 7
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.One, Tenant = tenants.Single(u => u.UserId == 7) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property", IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 7) },

        //       // Tenant 8
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences { Name="Wants Shared Accommodation",   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 8) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 8) },

        //       // Tenant 9
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=true, Weighting=(int)Weighting.Nine, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 9) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 9) },

        //       // Tenant 10
        //       new TenantPreferences {  Name="Wants House",                   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Detached Property",       IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Semi-Detached Property",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Apartment",               IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Town House",              IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Bungalow",                IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Cottage",                 IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Terrace House",           IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Mews",                    IsSelected=true, Weighting=(int)Weighting.Seven, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Shared Accommodation",   IsSelected=true, Weighting=(int)Weighting.Five, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Student Accommodation",  IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Property Near Schools",  IsSelected=true, Weighting=(int)Weighting.Six, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Want House Near Bus Routes",   IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Front Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Back Garden",            IsSelected=true, Weighting=(int)Weighting.Eight, Tenant = tenants.Single(u => u.UserId == 10) },
        //       new TenantPreferences {  Name="Wants Disabled Friendly Property",            IsSelected=false, Weighting=(int)Weighting.None, Tenant = tenants.Single(u => u.UserId == 10) }
        //    };
        //        tenantPreferences.ForEach(tp => context.TenantPreferences.AddOrUpdate(tp));
        //        //context.SaveChanges();

        //        #endregion

        //        #region LandlordPreferences

        //    //    var landlordPreferences = new List<LandlordPreferences>
        //    //{
        //    //    // Landlord 1
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 11 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 11) },
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 11 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 11) },
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 11 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 11 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 11 )},
        //    //    // Landlord 2
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 12 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 12 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 12) },
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 12 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 12 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 12 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 12 )},

        //    //    // Landlord 3
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 13 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 13 )},

        //    //    // Landlord 4
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 14 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 14 )},

        //    //    // Landlord 5
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 15 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 15 )},

        //    //    // Landlord 6
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 16 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 16 )},

        //    //    // Landlord 7
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 17 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 17 )},

        //    //    // Landlord 8
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 18 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 18 )},

        //    //    // Landlord 9
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=true, Weighting=(int)Weighting.Nine, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 19 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 19 )},

        //    //    // Landlord 10
        //    //    new LandlordPreferences {  Name="Wants Student",         IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Wants Professional",    IsSelected=true, Weighting=(int)Weighting.Six, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Wants Reference",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Allows Rent Allowance", IsSelected=true, Weighting=(int)Weighting.Eight, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Allows Pets",           IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Wants Group",           IsSelected=true, Weighting=(int)Weighting.Seven, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //    new LandlordPreferences {  Name="Allows Children",       IsSelected=false, Weighting=(int)Weighting.None, UserProfile = landlords.Single(u => u.UserId == 20 )},
        //    //};
        //    //    landlordPreferences.ForEach(lp => context.LandlordPreferences.AddOrUpdate(lp));
        //    //    //context.SaveChanges();

        //        #endregion

        //        #region Addresses

        //        var addresses = new List<Address>
        //    {
        //        // Address 1 associated with Property 1
        //        new Address { Line1="", Line2="", TownCity="Rathfarnham", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 2 associated with Property 2 
        //        new Address { Line1="", Line2="", TownCity="Rathfarnham", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 3 associated with Property 3 
        //        new Address { Line1="", Line2="", TownCity="Tallaght", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 4 associated with Property 4 
        //        new Address { Line1="", Line2="", TownCity="Tallaght", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 5 associated with Property 5
        //        new Address { Line1="", Line2="", TownCity="Tallaght", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 6 associated with Property 6 
        //        new Address { Line1="", Line2="", TownCity="Templeogue", County="Dublin", PostCode="", Latitude="", Longitude=""  },

        //        // Address 7 associated with Property 7 
        //        new Address { Line1="", Line2="", TownCity="Templeogue", County="Dublin", PostCode="", Latitude="", Longitude="" },

        //        // Address 8 associated with Property 8 
        //        new Address { Line1="", Line2="", TownCity="Tallaght", County="Galway", PostCode="", Latitude="", Longitude="" },

        //        // Address 9 associated with Property 9 
        //        new Address { Line1="", Line2="", TownCity="Tallaght", County="Cork", PostCode="", Latitude="", Longitude=""  },

        //        // Address 10 associated with Property 10
        //        new Address { Line1="", Line2="", TownCity="Rathfarnham", County="Kildare", PostCode="", Latitude="", Longitude="" },
        //    };
        //        addresses.ForEach(a => context.Address.Add(a));
        //        context.SaveChanges();

        //        #endregion

        //    }
        //    catch (Exception ex)
        //    {
        //        string lines = ex.ToString();
        //        System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\Home\Desktop\error.txt");
        //        file.WriteLine(lines);
        //        file.Close();
        //    }
        //}
    }
}
